<?php


/**
 * 
 * @author szm
 */
class Grammar  extends CI_Controller {
    
    public function index(){
        $lessonId= $_REQUEST['lesson_id']?$_REQUEST['lesson_id']:246;
        $this->load->model('Grammar_model');
        $data=$this->Grammar_model->getGrammars($lessonId);
        var_dump($data);die;
        $this->load->view('grammar/index',array('grammers'=>$data));
    }
    public function getGrammars(){
        $data=array();
        $this->load->view('Grammars',$data);
    }
    public function listAllGrammars(){
        $data=array();
        $this->load->view('list_all_Grammars');
    }
    
    public function getGrammar(){
        $data=array();
        $this->load->view('Grammar');
    }
    
    public function saveGrammar(){
        $data=array();
        redirect('/lesson/index/', 'refresh');

    }
    
    public function removeGrammar(){
        $data=array();
        redirect('/lesson/index/', 'refresh');
    }
}

